import request from '@/utils/request'

// 查询考试表列表
export function listExam(query) {
  return request({
    url: '/business/exam/list',
    method: 'get',
    params: query
  })
}

export function listNoPage(query){
  return request({
    url: '/business/exam/listNoPage',
    method: 'get',
    params: query
  })
}

// 查询考试表详细
export function getExam(id) {
  return request({
    url: '/business/exam/' + id,
    method: 'get'
  })
}

// 新增考试表
export function addExam(data) {
  return request({
    url: '/business/exam',
    method: 'post',
    data: data
  })
}

// 修改考试表
export function updateExam(data) {
  return request({
    url: '/business/exam',
    method: 'put',
    data: data
  })
}

// 删除考试表
export function delExam(id) {
  return request({
    url: '/business/exam/' + id,
    method: 'delete'
  })
}

 
export function listUser(query) {
  return request({
    url: '/business/exam/queryChoose' ,
    method: 'get',
    params: query
  })
}

export function saveExamUsers(data){
  return request({
    url: '/business/examstudent',
    method: 'post',
    data: data
  })
}

export function myExam(){
 return request({
  url: '/business/exam/myExam',
  method: 'get'
 }) 
}

export function myExamInfo(examId) {
  return request({
    url: '/business/exam/myExamInfo/' + examId,
    method: 'get'
  })
}

export function submitDataApi(data){
  return request({
    url: '/business/exam/submitExam',
    method: 'post',
    data: data
  })
}